using System;
using System.Collections.Generic;
using System.Text;

using AdventureWorks.Cinema.ServiceAccessLayer.WebService;

namespace AdventureWorks.Cinema.ServiceAccessLayer
{
    internal interface IServiceAccessProvider
    {
        #region Session

        void ConnectToSession(string sessionId);
        User LogOn(string userName, string password);
        void LogOff();
        void ChangePassword(string currentPassword, string newPassword);
        void ResetPassword(string userName);
        User GetCurrentUser();
        string SessionId { get; }

        #endregion

        #region Performance

        PerformanceInfo[] GetPerformances(DateTime startDate, 
            DateTime endDate);
        PerformanceInfo[] GetPerformancesOfMovie(Guid movieId);
        PerformanceInfo[] GetPerformancesOfRoom(Guid roomId, DateTime startDate, 
            DateTime endDate);
        Performance GetPerformance(Guid performanceId);
        void CreatePerformance(Performance performance);
        void UpdatePerformance(Performance performance);
        void DeletePerformance(Guid performanceId);
        int GetFreeSeats(Guid performanceId);

        #endregion

        #region Movie

        MovieInfo[] GetMovies();
        MovieInfo[] GetMovies(DateTime startDate);
        MovieInfo[] GetMoviesByUserInterests(Guid userId);
        MovieInfo[] GetMoviesByTitle(string movieTitle);
        Movie GetMovie(Guid movieId);
        void CreateMovie(Movie movie);
        void UpdateMovie(Movie movie);
        void DeleteMovie(Guid movieId);
        void RateMovie(Guid movieId, int rating);

        #endregion

        #region User

        User GetUser(Guid userId);
        UserInfo[] GetUsersForNewsletter();
        void CreateUser(User user, string password);
        void UpdateUser(User user);
        void DeleteUser(Guid userId);

        #endregion

        #region Room

        Room[] GetRooms();
        void CreateRoom(Room room);
        void UpdateRoom(Room room);
        void DeleteRoom(Guid roomId);

        #endregion

        #region Ticket

        string BuyTicket(Guid performanceId, int quantity);
        void SellTicket(Guid performanceId, int quantity);
        Ticket[] GetUndispatchedTickets(Guid userId);
        Ticket[] GetUndispatchedTickets(string ticketCode);
        void MarkTicketAsDispatched(Ticket ticket);

        #endregion

        #region News

        NewsItem[] GetNewsItems();
        NewsItem[] GetNewsItemsByCategories(int[] numbers);
        void CreateNewsItem(NewsItem newsItem);
        void UpdateNewsItem(NewsItem newsItem);
        void DeleteNewsItem(Guid newsItemId);

        #endregion

        #region News Categories

        NewsCategory[] GetNewsCategories();
        void CreateNewsCategory(NewsCategory category);
        void UpdateNewsCategory(NewsCategory category);
        void DeleteNewsCategory(Guid categoryId);

        #endregion

        #region Genre

        Genre[] GetGenres();
        void CreateGenre(Genre genre);
        void UpdateGenre(Genre genre);
        void DeleteGenre(Guid genreId);

        #endregion

        #region Country

        Country[] GetCountries();
        void CreateCountry(Country country);
        void UpdateCountry(Country country);
        void DeleteCountry(Guid countryId);

        #endregion

        #region Distributor

        Distributor[] GetDistributors();
        void CreateDistributor(Distributor distributor);
        void UpdateDistributor(Distributor distributor);
        void DeleteDistributor(Guid distributorId);

        #endregion

        #region Parental Guidance

        ParentalGuidance[] GetParentalGuidances();
        void CreateParentalGuidance(ParentalGuidance parentalGuidance);
        void UpdateParentalGuidance(ParentalGuidance parentalGuidance);
        void DeleteParentalGuidance(Guid parentalGuidanceId);

        #endregion

        #region Person

        Person[] GetPersons();
        void CreatePerson(Person person);
        void UpdatePerson(Person person);
        void DeletePerson(Guid personId);

        #endregion
    }
}
